package com.founder.chd_daily_query.entity.alarm;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "CONTRACT_WIN_MODEL", schema = "RBD_ALARM", catalog = "")
public class ContractWinModelEntity {
    private String contractId;
    private String purchaseSalePreceptId;
    private String contractCode;
    private String transportType;
    private String vendorId;
    private String receiveOrgId;
    private Long contractAmount;
    private Long qnet;
    private Long factoryPrice;
    private Long winBidPrice;
    private String status;
    private Long difference;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date createDate;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date lastUpdateDate;
    private String contractName;

    @Id
    @Column(name = "CONTRACT_ID")
    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    @Basic
    @Column(name = "PURCHASE_SALE_PRECEPT_ID")
    public String getPurchaseSalePreceptId() {
        return purchaseSalePreceptId;
    }

    public void setPurchaseSalePreceptId(String purchaseSalePreceptId) {
        this.purchaseSalePreceptId = purchaseSalePreceptId;
    }

    @Basic
    @Column(name = "CONTRACT_CODE")
    public String getContractCode() {
        return contractCode;
    }

    public void setContractCode(String contractCode) {
        this.contractCode = contractCode;
    }

    @Basic
    @Column(name = "TRANSPORT_TYPE")
    public String getTransportType() {
        return transportType;
    }

    public void setTransportType(String transportType) {
        this.transportType = transportType;
    }

    @Basic
    @Column(name = "VENDOR_ID")
    public String getVendorId() {
        return vendorId;
    }

    public void setVendorId(String vendorId) {
        this.vendorId = vendorId;
    }

    @Basic
    @Column(name = "RECEIVE_ORG_ID")
    public String getReceiveOrgId() {
        return receiveOrgId;
    }

    public void setReceiveOrgId(String receiveOrgId) {
        this.receiveOrgId = receiveOrgId;
    }

    @Basic
    @Column(name = "CONTRACT_AMOUNT")
    public Long getContractAmount() {
        return contractAmount;
    }

    public void setContractAmount(Long contractAmount) {
        this.contractAmount = contractAmount;
    }

    @Basic
    @Column(name = "QNET")
    public Long getQnet() {
        return qnet;
    }

    public void setQnet(Long qnet) {
        this.qnet = qnet;
    }

    @Basic
    @Column(name = "FACTORY_PRICE")
    public Long getFactoryPrice() {
        return factoryPrice;
    }

    public void setFactoryPrice(Long factoryPrice) {
        this.factoryPrice = factoryPrice;
    }

    @Basic
    @Column(name = "WIN_BID_PRICE")
    public Long getWinBidPrice() {
        return winBidPrice;
    }

    public void setWinBidPrice(Long winBidPrice) {
        this.winBidPrice = winBidPrice;
    }

    @Basic
    @Column(name = "STATUS")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "DIFFERENCE")
    public Long getDifference() {
        return difference;
    }

    public void setDifference(Long difference) {
        this.difference = difference;
    }

    @Basic
    @Column(name = "CREATE_DATE")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "LAST_UPDATE_DATE")
    public Date getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    @Column(name = "CONTRACT_NAME")
    public String getContractName() {
        return contractName;
    }

    public void setContractName(String contractName) {
        this.contractName = contractName;
    }

    @Override
    public String toString() {
        return "ContractWinModelEntity{" +
                "contractId='" + contractId + '\'' +
                ", purchaseSalePreceptId='" + purchaseSalePreceptId + '\'' +
                ", contractCode='" + contractCode + '\'' +
                ", transportType='" + transportType + '\'' +
                ", vendorId='" + vendorId + '\'' +
                ", receiveOrgId='" + receiveOrgId + '\'' +
                ", contractAmount=" + contractAmount +
                ", qnet=" + qnet +
                ", factoryPrice=" + factoryPrice +
                ", winBidPrice=" + winBidPrice +
                ", status='" + status + '\'' +
                ", difference=" + difference +
                ", createDate=" + createDate +
                ", lastUpdateDate=" + lastUpdateDate +
                ", contractName='" + contractName + '\'' +
                '}';
    }

    @Override
    public int hashCode() {

        return Objects.hash(contractId, purchaseSalePreceptId, contractCode, transportType, vendorId, receiveOrgId, contractAmount, qnet, factoryPrice, winBidPrice, status, difference, createDate, lastUpdateDate);
    }
}
